package com.xiaoka.camelv.service;

import java.util.Map;

import com.xiaoka.camelv.entity.CamelvFtp;
import com.xiaoka.camelv.entity.CamelvGroovy;
import com.xiaoka.camelv.entity.CamelvHost;
import com.xiaoka.camelv.entity.CamelvHttp;
import com.xiaoka.camelv.entity.CamelvJdbc;
import com.xiaoka.camelv.entity.CamelvLine;
import com.xiaoka.camelv.entity.CamelvMail;
import com.xiaoka.camelv.entity.CamelvQueue;
import com.xiaoka.camelv.entity.CamelvRoute;
import com.xiaoka.camelv.entity.CamelvServer;
import com.xiaoka.camelv.entity.vo.ResponseData;

/**
 * 资源推送接口<br/>
 * 
 * @author xiaoka
 *
 */
public interface ICamelvResourcePushService {

	public ResponseData pushCamelvFtp(CamelvFtp camelvFtp);

	public ResponseData pushCamelvGroovy(CamelvGroovy camelvGroovy);

	public ResponseData pushCamelvHost(CamelvHost camelvHost);

	public ResponseData pushCamelvHttp(CamelvHttp camelvHttp);

	public ResponseData pushCamelvJdbc(CamelvJdbc camelvJdbc);

	public ResponseData pushCamelvMail(CamelvMail camelvMail);

	public ResponseData pushCamelvQueue(CamelvQueue camelvQueue);

	public ResponseData pushCamelvRoute(CamelvRoute camelvRoute);

	public ResponseData pushCamelvServer(CamelvServer camelvServer);
	
	public ResponseData pushCamelvLine(CamelvLine camelvLine);
	
	public ResponseData pushCamelvLine(String serverId);

	/**
	 * 移动路由关系触发
	 * 
	 * @param oldFrom
	 * @param oldTo
	 * @param camelvLine
	 * @return
	 */
	public ResponseData pushCamelvLine4Move(String oldFrom, String oldTo, CamelvLine line);

	public ResponseData pushCamelvLine4Rename(String oldFrom, String oldTo, String newName);

	/**
	 * 删除路由关系
	 * 
	 * @param from
	 * @param to
	 * @return
	 */
	public ResponseData deleteCamelvLine(String from, String to);

	/**
	 * 将指定类型的资源推送到camel中
	 * 
	 * @param header
	 * @param data
	 * @return
	 */
	public ResponseData push(Map<String, String> header, String data);

	/**
	 * 删除指定类型的资源
	 * 
	 * @param type
	 * @param id
	 * @return
	 */
	public ResponseData delete(Map<String, String> header);

	public ResponseData delete(String type, String id);

}